import React, { Component } from 'react';
import { Link,NavLink,Switch,Route,Redirect} from "react-router-dom";
import Hom from "./index/Hom";
import MyKill from "./index/MyKill";
import ProductPage from "./index/ProductPage";
import ShopCart from "./index/shopcart.jsx";
import Mine from "./index/mine.jsx";
import MyTabbar from "../components/MyTabbar";
class Index extends Component {
    render() {
        return (
            <div className='index'>
                <Switch>
                    <Route exact path='/index/Hom' component={Hom}></Route>
                    <Route exact path='/index/MyKill' component={MyKill}></Route>
                    <Route  path='/index/ProductPage/:id' component={ProductPage}></Route>
                    <Route exact path="/index/shopcart" component={ShopCart} />
                    <Route exact path="/index/mine" component={Mine} />
                    <Redirect exact from='/index' to="/index/Hom" />
                </Switch>
                <MyTabbar></MyTabbar>
            </div>
        );
    }
}

export default Index;